import request from "@/utils/request";

// 查询老师管理列表
export function listTeacher(query) {
  return request({
    url: "/infomanagement/teacher/list",
    method: "get",
    params: query,
  });
}

// 查询老师管理详细
export function getTeacher(userId) {
  return request({
    url: "/infomanagement/teacher/" + userId,
    method: "get",
  });
}

// 新增老师管理
export function addTeacher(data) {
  return request({
    url: "/infomanagement/teacher",
    method: "post",
    data: data,
  });
}

// 修改老师管理
export function updateTeacher(data) {
  return request({
    url: "/infomanagement/teacher",
    method: "put",
    data: data,
  });
}

// 删除老师管理
export function delTeacher(userId) {
  return request({
    url: "/infomanagement/teacher/" + userId,
    method: "delete",
  });
}

export function getDetail(loginId) {
  return request({
    url: "/infomanagement/teacher/detail/" + loginId,
    method: "get"
  });
}
